<script setup>
import { ref,getCurrentInstance } from 'vue'
import { useRouter } from 'vue-router'
import { useI18n } from 'vue-i18n'
const { locale } = useI18n()
const { proxy } = getCurrentInstance()
const { $t } = proxy;
const emit = defineEmits(['close','sure','changeDataVal'])
const props = defineProps(['dataVal', 'title', 'show', 'type'])
locale.value = localStorage.getItem('lang') || 'zhCN'

// 关闭弹窗
const closePupop = () => {
    emit('close')
}
// 确认按钮
const sureEditPwd = ()=>{
    emit('sure')
}
const changeDataVal = (val)=>{
    emit('changeDataVal',val)
}
</script>

<template>
    <!-- 修改弹窗 -->
    <div class="mask" style="z-index: 200;" v-show="props.show">
        <div class="dialog">
            <div class="RechargeDialog"
                >
                <div
                    style="display: flex;align-items: center;justify-content: space-around;position: relative;width: 100%;">
                    <div class="RechargeWord">{{$t('msg.message.change')}} {{ props.title }}</div>

                    <img src="../../assets/img/policy/close.png" class="deleteImg" @click="closePupop" alt="">

                </div>
                <div class="countInput pwdInput">
                    <el-input  v-model="props.dataVal" @input="changeDataVal" :placeholder="`${$t('msg.message.PleaseEnterNew')} ${title}`" />
                </div>
                <!-- <div class="countInput pwdInput">
                    <el-input type="password" v-model="editPassWord.data.pwd2" placeholder="再次确认新密码" />
                </div> -->
                <div class="sureBtnBox padtop10" style="width: 93%;">
                    <el-button color="#5BCE3A" class="sureBtn" @click="sureEditPwd">{{ $t('msg.message.confirm') }}</el-button>
                </div>
                <!-- <div class="noAccount">
                    <div>已有账号？</div>
                    <div style="cursor: pointer;" @click="maskShow3 = false,maskShow2 = true">登录</div>
                </div> -->
            </div>

        </div>

    </div>
</template>

<style scoped>
.padtop10{
    padding-top: 10px;
}
 .deleteImg {
        width: 24px;
        height: 24px;
        cursor: pointer;
        position: absolute;
        right: 25px;
        bottom: 24px;
    }
    
    .countInput {
        display: flex;
        align-items: center;
        padding: 5px;
        border-radius: 2px;
        width: 92%;
    }
    
    .countInput img {
        width: 18px;
        margin: 0 30px;
        margin-right: 0;
    }
    
    .countInput>>>.el-input__wrapper {
        background: transparent !important;
        /* border: 1px solid #ffffff45; */
        box-shadow: unset !important;
        /* color: #fff !important; */
        /* border-radius: 3px; */
    
    }
    
    :deep(.el-input__inner::placeholder) {
        color: #fff
    }
    
    .countInput>>>.el-input__inner {
        color: #fff;
    }
    
/* 登录弹窗 */
.pwdInput {
    background: transparent;
    border: 2px solid #282D7A;
    margin-bottom: 10px;
}

.sureBtnBox {
    display: flex;
    padding-top: 20px;
}

.sureBtnBox>>>.el-button {
    width: 100%;
    color: #fff;
    /* background: #FC8704; */
    height: 48px;
    font-size: 20px;
}

.chengnianBox {
    display: flex;
}

.chengnianBox>>>.el-checkbox {
    color: #fff !important;
}

/* 充值弹窗遮罩层 */
.mask {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    min-height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.dialog {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 50%;
    height: 680px;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.RechargeWord {
    font-size: 23px;
    text-align: center;
    padding-bottom: 23px;
    /* padding-right: 44px; */
}

.RechargeDialog {
    background: #0F0F0F;
    /* color: #fff; */
    width: 80%;
    background: #0F0F0F;height:300px;margin-top: 100px;display: flex;flex-direction: column;align-items: center;
    border: 1px solid #fff;
    border-radius: 10px;
    /* overflow-y: auto; */
    padding: 24px;
}

.countInput {
    display: flex;
    align-items: center;
    background: #ffffff45;
    padding: 5px;
    border-radius: 2px;
}

.countInput img {
    width: 18px;
    margin: 0 30px;
}

.countInput>>>.el-input__wrapper {
    background: transparent !important;
    /* border: 1px solid #ffffff45; */
    box-shadow: unset !important;
    /* color: #fff !important; */
    /* border-radius: 3px; */
}

:deep(.el-input__inner::placeholder) {
    color: #fff
}

.countInput>>>.el-input__inner {
    color: #fff;
}


.sureBtnBox {
    display: flex;
    padding-top: 20px;
}

.dialogInfoText {
    font-size: 14px;
    color: #fff;
    width: 100%;
}
</style>
